﻿<local:DocumentBase x:Class="WPFExcelReport.AB05"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    xmlns:fd="clr-namespace:Labs.Filtering;assembly=ReflectionStudio.Core"
                    xmlns:wep="clr-namespace:WPFExcelReport"
                    Height="700" Width="1024" 
                    Loaded="Window_Loaded"
                    Title="AB05"  
     >
    <local:DocumentBase.Resources>
    </local:DocumentBase.Resources>
    <Grid DataContext="{Binding}">
        <Grid.RowDefinitions>
            <RowDefinition Height="26" />
            <RowDefinition Height="74" />
            <RowDefinition Height="157*" />
            <RowDefinition Height="231*" />
            <RowDefinition Height="55*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="79*"></ColumnDefinition>
            <ColumnDefinition Width="361*" />
            <ColumnDefinition Width="207*"></ColumnDefinition>
            <ColumnDefinition Width="233*" />
        </Grid.ColumnDefinitions>
        <StackPanel Grid.ColumnSpan="4" Orientation="Horizontal" Grid.RowSpan="2">
            <Button FontSize="18" Content="查询数据" Height="25" Margin="10,0,0,0" Name="butGetData" Click="butGetData_Click"></Button>
            <Button Content="后整理外加工单" Height="25" Margin="20,10,0,0"  Name="btnQuery" Width="97" Click="btnQuery_Click"/>
            <TextBlock FontSize="18"  Height="40"   Width="59" Name="txt1" Margin="30,10,0,0" Text="生产单" />
            <TextBlock FontSize="18"  Height="36"   Width="47" Name="txtABPAUFKRS" Margin="0,10,0,0" Text="" />
            <TextBlock  FontSize="18" Height="36"    Width="130" Name="txtABPAUFLFD"   Margin="5,10,0,0" Text="" />
            <TextBlock  FontSize="18" Height="35"    Width="50" Name="txtABPAUFPOS"   Margin="5,10,0,0" Text="" />
            <TextBlock  FontSize="18" Height="35"    Width="50" Name="txtWBBTP"   Margin="5,10,0,0" Text="" />
        </StackPanel>
        <fd:FilteringDataGrid CanUserReorderColumns="True"  
          CanUserResizeRows="True" CanUserSortColumns="True"
            IsFilteringCaseSensitive="False"
            AutoGenerateColumns="False"   
                  EnableRowVirtualization="True"  
                  RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                                IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                               ItemsSource="{Binding Path=ABPOS}" x:Name="ABPOSDataGrid" 
                               SelectionChanged="MainDataGrid_SelectionChanged" Grid.ColumnSpan="4" Margin="0,1,0,0" Grid.Row="2">
            <fd:FilteringDataGrid.Columns>
                <DataGridTextColumn Header="加工厂" Binding="{Binding LSNAME1}"/>
                <DataGridTextColumn Header="生" Binding="{Binding Path=ABPAUFKRS}"/>
                <DataGridTextColumn Header="产" Binding="{Binding ABPAUFLFD}"/>
                <DataGridTextColumn Header="单" Binding="{Binding ABPAUFPOS}"/>
                <DataGridTextColumn Header="品种" Binding="{Binding ABPART}"/>
                <DataGridTextColumn Header="版本" Binding="{Binding ABPVAR}"/>
                <DataGridTextColumn Header="色号" Binding="{Binding ABPFARBE}"/>
                <DataGridTextColumn Header="米数" Binding="{Binding WEI}"/>
                <DataGridTextColumn Header="码数" Binding="{Binding QUANTITY}"/>
                <DataGridTextColumn Header="开始" Binding="{Binding ABPSTARTDAT}"/>
                <DataGridTextColumn Header="交期" Binding="{Binding ABPENDDAT}"/>
                <DataGridTextColumn Header="行备注" Binding="{Binding REMARK}"/>
            </fd:FilteringDataGrid.Columns>
        </fd:FilteringDataGrid  >
        <fd:FilteringDataGrid CanUserReorderColumns="True"  
          CanUserResizeRows="True" CanUserSortColumns="True"
            IsFilteringCaseSensitive="False"
            AutoGenerateColumns="False"   
                  EnableRowVirtualization="True"  
                  RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                                IsSynchronizedWithCurrentItem="True"  Visibility="Visible"
                               ItemsSource="{Binding Path=WBBST}" x:Name="WBBSTDataGrid" 
                                Margin="0,1,0,0" Grid.Row="3" Grid.RowSpan="2"
                              Grid.ColumnSpan="3" Grid.Column="1">
            <fd:FilteringDataGrid.Columns>
                <DataGridTextColumn Header="缸号"  Width="80" Binding="{Binding WBBDPART}"/>
                <DataGridTextColumn Header="卷号" Binding="{Binding WBBSTKNR}"/>
                <DataGridTextColumn Header="品名" Binding="{Binding WBBART}"/>
                <DataGridTextColumn Header="变量" Binding="{Binding WBBVAR}"/>
                <DataGridTextColumn Header="颜色" Binding="{Binding WBBFARBE}"/>
                <DataGridTextColumn Header="备注" Binding="{Binding WBBBEM}"/>
                <DataGridTextColumn Header="毛米" Binding="{Binding WBBSSTKLG}"/>
                <DataGridTextColumn Header="净米" Binding="{Binding WBBISTKLG}"/>
                <DataGridTextColumn Header="质量" Binding="{Binding QUANLITY}"/>
                <DataGridTextColumn Header="库" Binding="{Binding WBBLO}"/>
                <DataGridTextColumn Header="区" Binding="{Binding WBBLB}"/>
                <DataGridTextColumn Header="位" Binding="{Binding WBBLP}"/>
                <DataGridTextColumn Header="入库日期" Binding="{Binding WBBEINDAT}"/>
            </fd:FilteringDataGrid.Columns>
        </fd:FilteringDataGrid  >
        <fd:FilteringDataGrid AutoGenerateColumns="False" CanUserReorderColumns="True" CanUserResizeRows="True" 
                              CanUserSortColumns="True" EnableRowVirtualization="True" Grid.RowSpan="2" 
                              HorizontalAlignment="Stretch" IsFilteringCaseSensitive="False" 
                              IsSynchronizedWithCurrentItem="True" ItemsSource="{Binding Path=BATCH}" Margin="0,1,0,1" 
                              x:Name="listBATCH" SelectionChanged="listBATCH_SelectionChanged"
                              RowDetailsVisibilityMode="VisibleWhenSelected" VerticalAlignment="Stretch"
                              Visibility="Visible" Grid.Row="3">
            <fd:FilteringDataGrid.Columns>
                <DataGridTextColumn Binding="{Binding WBBTP}" Header="分批号" />
            </fd:FilteringDataGrid.Columns>
        </fd:FilteringDataGrid>
    </Grid>
</local:DocumentBase>
